/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package BoardGameLanguage.util;

import BoardGameLanguage.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see BoardGameLanguage.BoardGameLanguagePackage
 * @generated
 */
public class BoardGameLanguageSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static BoardGameLanguagePackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BoardGameLanguageSwitch() {
		if (modelPackage == null) {
			modelPackage = BoardGameLanguagePackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
		case BoardGameLanguagePackage.BOARD: {
			Board board = (Board) theEObject;
			T result = caseBoard(board);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.FIGURE: {
			Figure figure = (Figure) theEObject;
			T result = caseFigure(figure);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.FIELD: {
			Field field = (Field) theEObject;
			T result = caseField(field);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.KING: {
			King king = (King) theEObject;
			T result = caseKing(king);
			if (result == null)
				result = caseFigure(king);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.ROOK: {
			Rook rook = (Rook) theEObject;
			T result = caseRook(rook);
			if (result == null)
				result = caseFigure(rook);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.KING_WHITE: {
			KingWhite kingWhite = (KingWhite) theEObject;
			T result = caseKingWhite(kingWhite);
			if (result == null)
				result = caseKing(kingWhite);
			if (result == null)
				result = caseFigure(kingWhite);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.KING_BLACK: {
			KingBlack kingBlack = (KingBlack) theEObject;
			T result = caseKingBlack(kingBlack);
			if (result == null)
				result = caseKing(kingBlack);
			if (result == null)
				result = caseFigure(kingBlack);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.ROOK_WHITE: {
			RookWhite rookWhite = (RookWhite) theEObject;
			T result = caseRookWhite(rookWhite);
			if (result == null)
				result = caseRook(rookWhite);
			if (result == null)
				result = caseFigure(rookWhite);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case BoardGameLanguagePackage.ROOK_BLACK: {
			RookBlack rookBlack = (RookBlack) theEObject;
			T result = caseRookBlack(rookBlack);
			if (result == null)
				result = caseRook(rookBlack);
			if (result == null)
				result = caseFigure(rookBlack);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		default:
			return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Board</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Board</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBoard(Board object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Figure</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Figure</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseFigure(Figure object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Field</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Field</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseField(Field object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>King</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>King</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseKing(King object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Rook</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Rook</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRook(Rook object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>King White</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>King White</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseKingWhite(KingWhite object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>King Black</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>King Black</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseKingBlack(KingBlack object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Rook White</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Rook White</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRookWhite(RookWhite object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Rook Black</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Rook Black</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRookBlack(RookBlack object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //BoardGameLanguageSwitch
